{% extends "base.html" %}

{% block title %}{{ title }}{% endblock %}

{% block content %}
<h1>{{ title }}</h1>
{% if adminMore %}
<div class="admin">
{% for m in adminMore %}
	<a class="admin" href="{{m.href}}">{{m.label}}</a>
{% endfor %}
</div>
{% endif %}

{% if prev %}<a href="{{ prev }}">Wstecz</a>{% endif %}
{% if next %}<a href="{{ next }}">Dalej</a>{% endif %}
<table class="tabela">
	<tr>
		{% for h in headers %}
		<th class="table"> {{ h }} </th>
		{% endfor %}
		{% if usun %}<th class="table">Usuń</th>{% endif %}
		{% if zmien %}<th class="table">Zmień</th>{% endif %}
	</tr>
	{% for r in rows %}
	<tr>
		{% for v in r.fields %}
		<td class="table">{{ v }}</td>
		{% endfor %}
		{% if usun %}<td class="table"><a href="{{ usun }}/{{r.id}}/">Usuń</a></td>{% endif %}
		{% if zmien %}<td class="table"><a href="{{ zmien }}/{{r.id}}/">Zmień</a></td>{% endif %}
	</tr>
	{% endfor %}
</table>
{% endblock %}
